package com.zhanghu.backendZray.constants;

import java.math.BigDecimal;
import java.time.format.DateTimeFormatter;

/**
 * @author ZhangDong
 * @date 2024/7/19 14:33
 */
public interface CommonConstant {

    String TOKEN = "Z-Token";
    String MENU_LIST = "MENU_LIST";
    String WX_LOGIN_EXPIRE = "WX_LOGIN_EXPIRE";
    String WX_LOGIN_INVALID_CALLBACK = "WX_LOGIN_INVALID_CALLBACK";
    String JWT_KEY = "23l4j23jl42";

    // 令牌过期时间，单位分钟; 7天; token过期不续期
    int TOKEN_EXPIRE_MINUTES = 10080;
    // 用户5分钟不发送ping消息，置为离线
    int USER_OFFLINE_MINUTES = 5;
    // 超管角色
    String SUPER_ADMIN_ROLE = "super_admin";

    // 游客身份角色
    String GUEST_ROLE = "guest";
    // 试用身份角色
    String TRIAL_ROLE = "trial";

    // 会员身份角色
    String MEMBER_ROLE = "member";

    // 普通管理员
    String ADMIN_ROLE = "admin";

    // 超管家人
    String SUPER_ADMIN_FAMILY_ROLE = "super_admin_family";

    // 家庭组身份角色
    String FAMILY_GROUP_ROLE = "family_group";

    // 密码盐
    String salt = "345zzhhrr";

    // 销售单前缀
    String ORDER_NO_PREFIX = "SPX";

    // 日期时间格式
    String DATE_TIME_FORMATE_NO_SPLITE = "yyyyMMddHHmmss";
    String DATE_TIME_FORMATE = "yyyy-MM-dd HH:mm:ss";

    DateTimeFormatter NO_SPLITE_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DATE_TIME_FORMATE_NO_SPLITE);
    DateTimeFormatter NORMAL_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DATE_TIME_FORMATE);

    // 支付宝API server url
    String ALIPAY_SERVER_URL = "https://openapi.alipay.com/gateway.do";

    // 年度会员价格
    BigDecimal MEMBER_PRICE = new BigDecimal("18.8");

    // 缩略图统一后缀
    String PREVIEW_FILE_NAME_SUFFIX = "-preview";

    // 缩略图统一宽高
    int PREVIEW_WIDTH = 200;
    int PREVIEW_HEIGHT = 200;
    // minIO 过期文件处理，提前的分钟数
    int MINIO_EXPIRE_PRE_MINUTES = 60 * 26;

    int AI_STREAM_DEPART = 9;

    String REQUEST_ID = "requestId";
    String USER_ID = "userId";

    String PING = "ping";

    // 试用角色文件上传限制次数
    int TRIAL_FILE_UPLOAD_LIMIT = 20;

}
